/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package algoGenetico;

import java.util.ArrayList;

/**
 *
 * @author Administrador
 */
public class Cromossomo {

    private ArrayList<Integer> genes;

    public Cromossomo(ArrayList<Integer> genes) {
        this.genes = new ArrayList<Integer>();
     //   this.genes =
        this.genes = (ArrayList<Integer>) genes.clone();
     //   System.out.println("tamanho eh "+ genes.length);
    }

    public int getTam(){
        return this.genes.size();
    }

    public ArrayList<Integer> getGenes() {
        return (ArrayList<Integer>) this.genes.clone();
    }

    public int getGene(int index){
        return this.genes.get(index);
    }

    public void setGenes(ArrayList<Integer> genes) {
        this.genes = genes;
    }

    public void setGen(int index, int gen){
        this.genes.add(index, gen);
    }

    public int removeGen(int index){
        return this.genes.remove(index);
    }

}
